package com.whfc.iot.fse.lift.entity;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author sun_guodong
 * @date 2021-05-31
 */
public class LiftMsgFactory {
    private static Logger logger = LoggerFactory.getLogger(LiftMsgFactory.class);

    public static LiftMsg createLiftMsg(int cmd) {
        LiftMsg liftMsg = null;
        switch (cmd) {
            case LiftConst.LIFT_UP_CMD_0X10:
                liftMsg = new LiftMsg0x10();
                break;
            case LiftConst.LIFT_UP_CMD_0X13:
                liftMsg = new LiftMsg0x13();
                break;
            default:
                logger.info("无法解析的指令,cmd:{}", cmd);
                break;
        }
        return liftMsg;
    }
}
